﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DictionaryManage.aspx.cs" Inherits="HQWeb.SysManage.DictionaryManage.DictionaryManage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
<link href="../../Styles/Site.css" rel="Stylesheet" type="text/css" />
    <script type="text/javascript">
        function AddChild() {
            var ID = document.getElementById("ParentID").value;
            if (ID != "") {

                var url, feature;
                var url = "DictionaryAddChild.aspx?ID=" + ID;
                var feature = "dialogWidth:650px;dialogHeight:480px;center:yes;help:no;resizable:yes;status:no;scroll:no";
                //var title = "添加 子部门信息";
                var varReturn = window.showModalDialog(url, '', feature);

                window.parent.frames['leftFrame'].location.reload();
                return false;
            }
            else {
                alert("请选择一条记录...");
                return false;
            }
        }

        function a() {
            window.parent.frames["leftFrame"].location.reload();
        }


        //排序子部门
        function OrderChildDept() {
            var ID = document.getElementById("ParentID").value;
            if (ID != "") {
                var url, title, feature;
                var url = "DictionaryOrderChild.aspx?ID=" + ID;
                var feature = "dialogWidth:650px;dialogHeight:480px;center:yes;help:no;resizable:yes;status:no;scroll:no";
                //var title = "添加 子部门信息";
                var varReturn = window.showModalDialog(url, '', feature);

                window.parent.frames['leftFrame'].location.reload();
                return false;
            }
            else {
                alert("请选择一条记录...");
                return false;
            }
        }

        function IsDelete() {
            if (confirm('确定要删除该记录？')) {
                return true;
            }
            else {
                return false;
            }
        }           
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
     <table width="98%">
            <tr>
                <td colspan="4" class="title">
                    <asp:Label runat="server" ID="labTitle" Text="修改系统类库信息"></asp:Label>
                </td>
            </tr>
            <tr>
                <td align="right" style="width: 20%">
                    名 称 ：
                </td>
                <td colspan="3">
                    <asp:TextBox ID="txt_Name" runat="server" Width="158px"></asp:TextBox>
                        <font color="red">*</font>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                            ControlToValidate="txt_Name" ErrorMessage="名称不能为空" Display="Dynamic"></asp:RequiredFieldValidator>
                        <asp:Label ID="lbl_Message" runat="server" ForeColor="Red"></asp:Label>
                        <input type="hidden" id="txt_parentID" runat="server" />
                </td>
            </tr>
             <tr>
                <td align="right">
                    所属分类：
                </td>
                <td>
                    <asp:DropDownList ID="ddl_type" runat="server" Width="158px">
                    </asp:DropDownList>
                </td>
            </tr>
              <tr>
                    <td align="right">顺序号：</td>
                    <td>
                        <asp:TextBox ID="txt_OrderID" runat="server" Width="125px" Text="0"></asp:TextBox>
                        （数值越小越靠前）</td>
                </tr>
                
                <tr>
                    <td align="right">备注：</td>
                    <td>
                        <asp:TextBox ID="txt_Other" runat="server" TextMode="MultiLine" Width="30%"></asp:TextBox>
                    </td>
                </tr>
                
                <tr>
                    <td colspan="2" align="center">
                            
                        &nbsp;&nbsp;&nbsp;
                        
                        <asp:Button ID="btn_AddChild" runat="server" Text="新建子结点" Width="90px"  
                            OnClientClick="AddChild();"/>
                        &nbsp;&nbsp;&nbsp;
                        <asp:Button ID="btn_Update" runat="server" Text="修改结点" Width="72px" onclick="btn_Update_Click"/>
                    &nbsp;&nbsp;
                        <asp:Button ID="btn_Delete" runat="server" Text="删除结点"  OnClientClick="return IsDelete()"
                            onclick="btn_Delete_Click" style="height: 21px" />
                                                    
                    </td>                
                </tr>
                <tr>
                    <td colspan="4">
                    <input id="btnRefresh" type="button" value="左边框刷新" onclick="a()"/>&nbsp;
            <input id="btnOrder" type="button" value=" 排序 "  onclick="OrderChildDept()"/>
                    </td>
                </tr>
            </table> 
    </div>
     <div style="display: none">
        <asp:HiddenField ID="ParentID" runat="server" />
     </div>
    </form>
</body>
</html>
